#ifndef GUI_H
#define GUI_H

#include <QtGui/QWidget>
#include <QPushButton>
#include <QDial>
#include <QLCDNumber>
#include <QSpinBox>
#include <QRadioButton>
#include <QWidget>
#include <QVBoxLayout>
#include <QLabel>
#include <QRadioButton>
#include <math.h>
#include <stdio.h>
#include <iostream>

using namespace std;

#define MAX_FREQUENCY 8000
#define MIN_FREQUENCY 250
#define MAX_INTENSITY 100
#define MIN_INTENSITY 0

class GUI : public QWidget
{
    Q_OBJECT

public:
    GUI(QWidget *parent = 0);
    ~GUI();
    void update_frequency(int freq);
    void update_db(int amp);
    double db_to_ratio(int db_gain);

    int frequency;
    int db;

    QWidget* widget;

    QGridLayout* grid_layout;

    QVBoxLayout* main_layout;

    QVBoxLayout* vertical_layout1;
    QVBoxLayout* vertical_layout2;

    QPushButton* Increase_db;
    QPushButton* Decrease_db;
    QSpinBox* db_step;
    QLCDNumber* db_number;
    QLabel* db_label;
    QDial* db_dial;

    QPushButton* Increase_freq;
    QPushButton* Decrease_freq;
    QSpinBox* freq_step;
    QLCDNumber* freq_number;
    QLabel* freq_label;
    QDial* freq_dial;

    QPushButton* play_sound;
    QPushButton* stop_sound;

    QRadioButton* use_white_noise;

private slots:
    void increase_db(void);
    void increase_freq(void);
    void decrease_db(void);
    void decrease_freq(void);
    void disable_all_buttons(bool state);

private:
};

#endif // GUI_H
